![]() |
SetPreserveGlyph |
||||
Header: | Fonts.h | Carbon status: | Supported | |
Temporarily changes the default behavior of the Font Manager, so that it does not scale oversized glyphs.
void SetPreserveGlyph ( Boolean preserveGlyph );
Specifies whether or not glyphs from an outline font are scaled to fit between the ascent and descent lines. If you set the value of the preserveGlyph parameter to TRUE, the measurements of all glyphs are preserved, which means that your application may have to alter the leading between lines in a document if some of the glyphs extend beyond the ascent or descent lines. If you set the value of the preserveGlyph parameter to FALSE, all glyphs are scaled to fit between the ascent and descent lines.
The SetPreserveGlyph function establishes how the Font Manager treats glyphs that do not fit between the ascent and descent lines for the current font. The default behavior for the Font Manager is to scale a glyph from an outline font so that it fits between the ascent and descent lines; however, this alters the appearance of the glyph.
You can determine the current behavior of the Font Manager in this regard by calling the GetPreserveGlyph function. To ensure that documents have the same appearance whenever they are opened, you need to call GetPreserveGlyph and save the value that it returns with your documents and restore it each time a document is displayed by your application.
Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)